<template>
  <div class="pop-filter">
    <Title title="展示样式" />
    <div style="margin-top:12px;padding-left:14px;">
      <el-radio-group v-model="value['showType']" @change="selectChange">
        <el-radio :label="0"><span style="font-size:14px;">按天</span></el-radio>
        <el-radio :label="1"><span style="font-size:14px;">按月</span></el-radio>
      </el-radio-group>
    </div>
  </div>
</template>

<script>
import Title from '@/components/Title';
export default {
  components: { Title },
  model: {
    prop: 'value',
    event: 'changeValue'
  },
  props: {
    value: {
      type: Object,
      default: () => {
        return {};
      }
    }
  },
  methods: {
    selectChange(e) {
      this.$emit('changeValue', this.value);
      this.$emit('searchData');
    },
    isTimeField(field) {
      if (!field) return false;
      return field.indexOf('日期') >= 0 || field.indexOf('时间') >= 0 || field === '预计到款';
    }
  }
};
</script>

<style lang="scss" scoped>
.pop-filter {
  margin-top: 24px;
}
</style>
